<%--                                                                       --%>
<%-- Copyright (c) 2004 BroadVision, Inc.  All rights reserved.            --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

<script language="JavaScript">

  function doMicrositeTemplateEditAction(myform) {
    myform.action = '<c:url value="/ep/micrositeTemplateEdit.do"/>';
    myform.submit();
  }

  function doMicrositeTemplateDeleteAction(myform) {
  	if(confirm('<bean-el:message key="ep.microsite.delete.confirm" bundle="ep.messages"/>')){
    	myform.action = '<c:url value="/ep/micrositeTemplateDelete.do"/>';
		myform.submit();
		return;
	}
	else return false;
  }

 function micrositeTemplateInstancesSearchList()
       {
   		                 var  theForm = document.forms['epMicrositeTemplateEditForm'];
   			  	          theForm.micrositeTemplateName.value='<c:out value="${pagetabParam.micrositeTemplateName}"/>';
   				           theForm.action = '<html-el:rewrite page="/ep/micrositeTemplateInstancesList.do" />';
   				           theForm.submit();
           return false;

       }

</script>

<html-el:form action="/ep/micrositeTemplateView.do" method="get" >
<html-el:hidden property="micrositeTemplateId" value="${epMicrositeTemplateDetailsView.map.id}" />
<html-el:hidden property="instanceCount" value="${epMicrositeTemplateDetailsView.map.instanceCount}" />
<html-el:hidden property="micrositeTemplateName" value="" />
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
    <td valign="top" width="100%">
      <div class="pageTitle">
	  	<bean-el:message key="ep.microsite.templates.view.page.title" arg0="${epMicrositeTemplateDetailsView.map.name}" bundle="ep.messages"/>
      </div>
      <div class="errorMessage"><html-el:errors/></div>
      <%@ include file="/mc/common/pagetab.jsp" %>
      <div class="pageSubtitle">
        <span class="left">
          <bean-el:message key="ep.microsite.templates.information" bundle="ep.messages"/>
        </span>
        <span class="right">
          <input type="button" class="inputButton" value='<bean-el:message key="button.edit" bundle="ep.messages"/>'
            onclick="doMicrositeTemplateEditAction(this.form);">
          <c:if test="${epMicrositeTemplateDetailsView.map.instanceCount==0}">
            <input type="button" class="inputButton" value='<bean-el:message key="button.delete" bundle="ep.messages"/>'
              onclick="doMicrositeTemplateDeleteAction(this.form);">
          </c:if>
        </span>
      </div>
      <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
        <tr>
          <td class="label" width="30%">
            <bean-el:message key="ep.microsite.templates.detail.label.name" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
            <c:out value="${epMicrositeTemplateDetailsView.map.name}"/>
          </td>
        </tr>
        <tr>
          <td class="label" width="30%">
            <bean-el:message key="ep.microsite.templates.detail.label.actionHandler" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
            <c:out value="${epMicrositeTemplateDetailsView.map.scriptPath}"/>
          </td>
        </tr>
        <tr>
          <td class="label" width="30%">
            <bean-el:message key="ep.microsite.templates.detail.label.phase" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
	   <c:choose>
		<c:when test='${epMicrositeTemplateDetailsView.map.phaseFlag}'>
			<bean-el:message key="ep.microsite.templates.detail.label.phase.true" bundle="ep.messages"/>
		</c:when>
		<c:otherwise>
			<bean-el:message key="ep.microsite.templates.detail.label.phase.false" bundle="ep.messages"/>
		</c:otherwise>
	</c:choose>
          </td>
        </tr>
        <tr>
          <td class="label" width="30%">
            <bean-el:message key="ep.microsite.templates.detail.label.description" bundle="ep.messages"/>:
          </td>
          <td class="labelField" width="70%">
            <c:out value="${epMicrositeTemplateDetailsView.map.description}"/>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</html-el:form>
